svm: Greatly reduce total number of CR8 intercepts
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 10 Sep 2007 15:13:13 +0000 (16:13 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 10 Sep 2007 15:13:13 +0000 (16:13 +0100)
commit300b3c46074c8b79b30c5b89b013fe2c496b0fef
treec37e6488658d13fc164c971c3290ec108f1bf08b
parentfefbe3dfcf96f59ab1e24f375f84086d86ac1256
svm: Greatly reduce total number of CR8 intercepts

This patch reduces the number of CR8 intercept to a fraction of the
number of CR8 intercepts without.  First, CR8 read intercepts are
completely disabled since the SVM vTPR is kept kept in sync with the
HVM vLAPIC TPR.  Second, CR8 write intercepts are enabled and disabled
based upon certain conditions.  Most of the time, CR8 write intercepts
are disabled.  They are enabled only when there is a pending interrupt
that can't be delivered because of either the current ISR or TPR (aka
PPR) because this is the only time the TPR matters.

With this patch, the number of CR8 intercepts dropped from around
10,000,000 to around 6,000 during boot of Windows 2003 Server 64-bit
(this is a rough estimate).

Signed-off-by: Travis Betak <travis.betak@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/hvm/svm/intr.c
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/hvm/svm/vmcb.c